]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
slider: Unset signal IDs when ending the slider drag
authorJonas Dreßler <verdre@v0yd.nl>
Sun, 22 Sep 2019 11:31:02 +0000 (13:31 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Sun, 22 Sep 2019 22:20:41 +0000 (22:20 +0000)
Unset the signal IDs we connected to when starting the drag. Otherwise
we get error messages if a touch drag is ended after a mouse drag
happened because the signal IDs are still set but no signals are
connected.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/740

js/ui/slider.js

index 3e35dbcb26199ed56fdd060abc538d859afb8d68..662716d6704ba9612de991df88da941cdda9b99b 100644 (file)
@@ -100,10 +100,15 @@ var Slider = GObject.registerClass({
 
     _endDragging() {
         if (this._dragging) {
-            if (this._releaseId)
+            if (this._releaseId) {
                 this.disconnect(this._releaseId);
-            if (this._motionId)
+                this._releaseId = 0;
+            }
+
+            if (this._motionId) {
                 this.disconnect(this._motionId);
+                this._motionId = 0;
+            }
 
             if (this._grabbedSequence != null)
                 this._grabbedDevice.sequence_ungrab(this._grabbedSequence);